<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>Title</title>
    <style>
        .head {
            width: 100%;
            height: 90px;
            text-align: center;
        }

        .head span {
            width: 100%;
            font-size: 30px;
            font-weight: 700;
            color: #333333;
            line-height: 60px;
            letter-spacing: 0px;

        }

        body {
            font-family: SimSun;
        }

        td {
            word-wrap: break-word;
            word-break: break-all;
        }

        .left {
            text-align: left;
        }

        .right {
            text-align: right;
        }
    </style>
</head>

<body>
<#escape x as x?html>


<#assign size=10>
<#if datas?exists>

<#--计算所有明细合计-----begin----->
<#assign lineTotal=0>
<#list 0 .. datas?size - 1 as i>
    <#assign data=datas[i]>
    <#if data.EvaluationMnyTC?exists>
        <#assign lineTotal +=data.EvaluationMnyTC?number>
    </#if>
</#list>

<#--计算所有明细合计-----=end=----->

<#assign page=(datas?size/size)?ceiling>
<#list 1..page as c>
<#if c*size gt datas?size>
    <#assign end=datas?size-1 />
<#else>
    <#assign end=c*size-1 />
</#if>

<div>
    <#if page=c>
    <div>
        <#else>
        <div style="page-break-after:always;">
            </#if>
            <table width="100%" border="0" cellspacing="0" cellpadding="3">
                <tr>
                    <td colspan="3" class="head" style="text-align: center">
                        <span>销售退回收货</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"><b
                                style="font-size: 20px; margin: 0 10px 0 20px;">入库单号:</b>${DocNo!}
                    </td>
                    <td width="33%"><span
                                style="margin: 0 10px 0 20px;">第${c}页/共${page}页</span></td>
                </tr>
                <tr>
                    <td width="34%"><span
                                style="margin: 0 10px 0 20px;">操作原因:</span>${DocType!}</td>
                    <td><span
                                style="margin: 0 10px 0 20px;">退货客户:</span>${RtnCustomer_Name!}
                    </td>
                    <td><span style="margin: 0 10px 0 20px;">收货部门:</span>${RcvDept!}
                    </td>
                </tr>
                <tr valign="">
                    <td width="33%"><span
                                style="margin: 0 10px 0 20px;">入库日期:</span>${BusinessDate!}
                    </td>
                    <td><span style="margin: 0 10px 0 20px;">库管员:</span>${WhMan!}</td>
                    <td><span style="margin: 0 10px 0 20px;">存储地点:</span>${WH!}</td>
                </tr>
            </table>
            <div>
                <table width="100%" border="1" cellspacing="0" cellpadding="0"
                       style="table-layout:fixed;text-align: center;">
                    <thead style="display:table-header-group;font-weight:bold">
                    <tr style="">
                        <td width="5%">行号</td>
                        <td width="12%" class="zhong">料号</td>
                        <td width="17%" class="zhong">物料名称</td>
                        <td width="18%" class="zhong">规格</td>
                        <td width="18%" class="zhong">型号</td>
                        <td width="5%" class="zhong">单位</td>
                        <td width="12%" class="zhong">实收数量</td>
                        <td width="13%" class="zhong">估价金额</td>
                    </tr>
                    </thead>
                    <#list (c-1) * size..end as i>
                        <#assign data=datas[i]>
                        <tr>
                            <td height="30px">${data.DocLineNo!}</td>
                            <td class="left">${data.ItemInfo_ItemCode!}</td>
                            <td class="left">${data.ItemInfo_ItemName!}</td>
                            <td class="left">${data.SPECS!}</td>
                            <td class="left">${data.Model!}</td>
                            <td>${data.UOM!}</td>
                            <td class="right">${data.RcvQtyTU!}</td>
                            <td class="right">${data.EvaluationMnyTC!}</td>
                        </tr>
                    </#list>
                    <tr>
                        <td height="30px" colspan="7"><b>本单合计</b></td>
                        <td width="13%" class="right">
                            <b>${lineTotal?string('0.000000')!}</b>
                        </td>

                    </tr>
                </table>
                <br />
                <table width="95%" border="0" cellspacing="0" cellpadding="-30">
                    <tbody>
                    <tr>
                        <td width="33%" style="padding-left: 20px;"><span
                                    style="margin-right: 10px;">审核日期:</span>${ApprovedOn!"
                                                                "}</td>
                        <td width="33%"><span
                                    style="margin-right: 10px;">审核人:</span>${ApprovedBy!"
                                                                "}</td>
                        <td width="33%"><span
                                    style="margin-right: 10px;">制单人:</span>${CreatedBy!"
                                                                "}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </#list>
    </#if>
    </#escape>
</body>

</html>